package com.ikun.usercenter.common;

import lombok.Data;

/**
 * 错误码
 * @author 顾琴
 *
 */

public enum ErrorCode {



    SUCCESS(20000,"成功",""),
    PARAMS_ERROR(40000,"请求参数错误",""),
    NULL_ERROR(40001,"请求参数为空",""),
    NOT_LOGIN(40100,"未登录",""),
    IS_EXISTS(40012,"用户已存在",""),
    WRONG_ACCOUNT(40016,"账号字符异常",""),
    WRONG_PWD(40017,"账户密码不匹配",""),
    PWD_MUST_SAME(40015,"两次密码不一致",""),
    NO_AUTH(40101,"无权限",""),
    SYSTEM_ERROR(50000,"系统内部异常","");
    private final int code;



    /**
     * 状态码信息
     */
    private final String msg;

    /**
     * 状态码详情
     */
    private final String description;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public String getDescription() {
        return description;
    }
    ErrorCode(int code, String msg, String description) {
        this.code = code;
        this.msg = msg;
        this.description = description;
    }
}
